Skip to content

BIG-21201 fix Sku options#150

Closed
zvuki wants to merge 1 commit into
bigcommerce:masterfrom
zvuki:BIG-21201
Closed

BIG-21201 fix Sku options#150
zvuki wants to merge 1 commit into
bigcommerce:masterfrom
zvuki:BIG-21201

Conversation

@zvuki

@zvuki zvuki commented Aug 17, 2015

Copy link
Copy Markdown
Contributor

related issue #92

cc @bc-joshroe @bc-sandeep @bc-bfenton

@zvuki

zvuki commented Aug 17, 2015

Copy link
Copy Markdown
Contributor Author

I may need to increment a version for bigcommerce-api-php, do I?

@bc-bfenton

Copy link
Copy Markdown
Contributor

if you want it to be deployable in the app, yes. I'm also not sure you have the ability to tag new versions? I think only maybe Anthony & Matt can.

Also, Travis is unhappy, and I don't think this is the right fix for this bug. You're removing functionality as well as code that will cause an error if executed, rather than fixing bug in a way that keeps the functionality

@zvuki

zvuki commented Aug 17, 2015

Copy link
Copy Markdown
Contributor Author

@bc-bfenton
I am removing the code that adds product_id to the option level
$option->product_id = $this->product_id
but it doesn't belong to this level, check this out https://developer.bigcommerce.com/api/stores/v2/products/skus#get-a-product-sku

I'll remove the failing test as well, as it's checking the removed code functionality.

@bc-bfenton

Copy link
Copy Markdown
Contributor

So what happens if we call $sku->option? do we get a list of SkuOption resources?

@zvuki

zvuki commented Aug 17, 2015

Copy link
Copy Markdown
Contributor Author

@bc-bfenton It returns an Array of stdClass Objects

@bc-bfenton

Copy link
Copy Markdown
Contributor

I think if we can pull it off it should be an array of \Resource\SkuOptions objects, but if not then stdClass is better than broken

@zvuki

zvuki commented Aug 18, 2015

Copy link
Copy Markdown
Contributor Author

I deleted \Resource\SkuOptions as there is no such documented resource

cc @lord2800

@sandeepgraju

Copy link
Copy Markdown

Can you add the functional test you updated in SkuGetApiTest , with additional assert

@zvuki

zvuki commented Aug 18, 2015

Copy link
Copy Markdown
Contributor Author

@bc-sandeep this must go to a separate PR, I thought you were writing this test. so after this PR is merged you'll be able to do composer install -o and check that the bug is gone

@lord2800

Copy link
Copy Markdown
Contributor

Agree re: SkuOptions. I wasn't able to find that endpoint in our docs nor our code anywhere. Additionally, it's a class that would have exactly 2 public properties and no create/delete/update/get functions, so I don't see a point in it existing. Happy for others to prove me wrong though.

@bc-bfenton

Copy link
Copy Markdown
Contributor

I'm good with that. Also we'll additionally have to tag a new release of the API client before composer install -o will get the new code. we might also need to update composer.json too, since it specifies that we're using "bigcommerce/api": "3.0.0-beta.10"

@sandeepgraju

Copy link
Copy Markdown

Considering this is going to master for all existing customers . Would that be okI would rather see both both dev code and test code going together.

Can i merge the updated test with additional asserts into your branch.
Should be super quick and would make sure it works atleast for basic vanilla case

@sandeepgraju

Copy link
Copy Markdown

Spoke offline. As the functional test I mentioned is in different repo, the one added in functional suite won't pass unless the steps done by Andrei are mentioned in above.

So I will merge the tests in bc repo once after this merge happens. Looks good from my side to merge 💚

@zvuki

zvuki commented Aug 18, 2015

Copy link
Copy Markdown
Contributor Author

Hi @aleachjr! Could you merge this PR and set a version on it? :)

@bc-jz

bc-jz commented Sep 3, 2015

Copy link
Copy Markdown
Contributor

These are the same changes made in this PR:
#146

which also includes small fixes to the Shipments class.

@zvuki zvuki closed this Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants